
//############

function LDIRBaseMarker(data) {
  LDIRMarker.apply(this, arguments);
  this.setTitle("FLAG STATION: " + this.name);
  // this.id = data['id'] + 10000;
}

//############

LDIRBaseMarker.prototype = new LDIRMarker({lat:0,lng:0,id:0,desc:'',tm:0,ic:1});
LDIRBaseMarker.prototype.constructor = LDIRBaseMarker;

//############

LDIRBaseMarker.prototype.markerClicked = function(event) {
  function padZero(x) { return ((x < 10) ? '0' : '') + x; }
  try {
    var content = '<div id="content_fls" class="cont"><h1>Flag Station</h1><table>';

    content += '<tr><td>Name:</td><td class="b">' + this.name + '</td></tr>';
    content += '<tr><td>ID:</td><td>' + this.id + '</td></tr>';

    if (this.desc.length > 0)
      content += '<tr><td>Description:</td><td>' + this.desc + '</td></tr>';

    content += '</table></div>';
    selectedMarker = this;
    infoWindow.close();
    infoWindow.setContent(content);
    infoWindow.open(map, this);
  }
  catch(err) {
    if (Const.logging) console.log("ERROR -- LDIRBaseMarker.markerClicked -- " + err);
  }
}

//############

LDIRBaseMarker.prototype.toString = function() {
  return "(" + this.id + " (" + this.name + ") at " + this.getPosition() + ")";
}
